package com.yisu.auction.api.domain.vo.goodsInfoPackageVos;

import org.apache.commons.lang.StringUtils;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * author: 赵杰
 * Business Description：奖品详情
 * createTime：2017/8/14
 */
public class PrizeVo {

    private Long prizeId;

    private Long goodsId;

    private BigDecimal price;

    private BigDecimal transactionPrice;

    private String image;

    private String name;

    private Integer term;

    private Byte status;

    private String statusDesc; //状态描述

    private Byte isTen;

    private BigDecimal consumptionWallet; //此次竞拍消费的拍币

    private String offerPriceDate;//最后出价时间

    private String announceTime;

    private int beginCountDown;//开始倒计时

    private Long  nextPeriodPrizeId;//下期竞品ID

    private String nickname;

    private long memberId; //拍中的会员ID

    private Integer orderStatus;//订单状态

    private String savePercentage; //节省百分比

    private String returnMoneyDesc;//返现描述

    private BigDecimal payableAmount; //剩余应付金额

    private List<PrizeButtonVo> prizeButtonVos;//竞品按钮

    public Long getPrizeId() {
        return prizeId;
    }

    public void setPrizeId(Long prizeId) {
        this.prizeId = prizeId;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getTransactionPrice() {
        if(transactionPrice==null)
            return BigDecimal.valueOf(0);
        return transactionPrice;
    }

    public void setTransactionPrice(BigDecimal transactionPrice) {
        this.transactionPrice = transactionPrice;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getTerm() {
        return term;
    }

    public void setTerm(Integer term) {
        this.term = term;
    }

    public Byte getStatus() {
        if (status == 2)
            status = 1;
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Byte getIsTen() {
        return isTen;
    }

    public void setIsTen(Byte isTen) {
        this.isTen = isTen;
    }

    public BigDecimal getConsumptionWallet() {
        return consumptionWallet;
    }

    public void setConsumptionWallet(BigDecimal consumptionWallet) {
        this.consumptionWallet = consumptionWallet;
    }

    public String getOfferPriceDate() {
        return offerPriceDate;
    }

    public void setOfferPriceDate(String offerPriceDate) {
        this.offerPriceDate = offerPriceDate;
    }

    public int getBeginCountDown() {
        return beginCountDown;
    }

    public void setBeginCountDown(int beginCountDown) {
        this.beginCountDown = beginCountDown;
    }

    public Long getNextPeriodPrizeId() {
        if(nextPeriodPrizeId==null)
            return Long.valueOf(0);
        return nextPeriodPrizeId;
    }

    public void setNextPeriodPrizeId(Long nextPeriodPrizeId) {
        this.nextPeriodPrizeId = nextPeriodPrizeId;
    }

    public String getNickname() {
        if (StringUtils.isEmpty(nickname)) {
            return "匿名";
        }
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public List<PrizeButtonVo> getPrizeButtonVos() {
        return prizeButtonVos;
    }

    public void setPrizeButtonVos(List<PrizeButtonVo> prizeButtonVos) {
        this.prizeButtonVos = prizeButtonVos;
    }

    public String getStatusDesc() {
        return statusDesc;
    }

    public void setStatusDesc(String statusDesc) {
        this.statusDesc = statusDesc;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getSavePercentage() {
        return savePercentage;
    }

    public void setSavePercentage(String savePercentage) {
        this.savePercentage = savePercentage;
    }

    public String getReturnMoneyDesc() {
        return returnMoneyDesc;
    }

    public void setReturnMoneyDesc(String returnMoneyDesc) {
        this.returnMoneyDesc = returnMoneyDesc;
    }

    public String getAnnounceTime() {
        return announceTime;
    }

    public void setAnnounceTime(String announceTime) {
        this.announceTime = announceTime;
    }

    public BigDecimal getPayableAmount() {
        return payableAmount;
    }

    public void setPayableAmount(BigDecimal payableAmount) {
        this.payableAmount = payableAmount;
    }

    public long getMemberId() {
        return memberId;
    }

    public void setMemberId(long memberId) {
        this.memberId = memberId;
    }
}
